package com.defect.service.statisticsService.statisticsServiceImpl;

import com.defect.mapper.SeverityMapper;
import com.defect.po.Severity;
import com.defect.service.statisticsService.SSeverityService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class SSeverityServiceImpl implements SSeverityService {
    @Resource
    private SeverityMapper severityMapper;

    /**
     * 带条件查询每种缺陷严重程度的数量
     * @param id 项目id
     * @param date1 起始时间
     * @param date2 最后时间
     * @return 返回实体类集合，属性count1：缺陷严重程度的数量，属性severityDesc：缺陷严重程度描述
     * @throws Exception
     */
    @Override
    public List<Severity> selectSeverityCount(int id, Date date1, Date date2) throws Exception {
        return severityMapper.selectSeverityCount(id,date1,date2);
    }
}
